/**
 * @description 获取所有角色
 * */
import { getAllRole } from '@/api/mixins'

export default {
  data() {
    return {
      roleList: []
    }
  },
  methods: {
    async getAllRole() {
      const { data, success, message } = await getAllRole()
      if (success) {
        this.roleList = data
      } else {
        this.$message({ type: 'error', message })
      }
    }
  },
  mounted() {
    this.getAllRole()
  }
}
